<?php
namespace Application\DefaultBundle\Menu;

use Knp\Menu\FactoryInterface;
use Symfony\Component\DependencyInjection\ContainerAware;

class Builder extends ContainerAware
{
    public function mainMenu(FactoryInterface $factory, array $options)
    {
        $menu = $factory->createItem('root');

        $menu->addChild('Главная', array('route' => 'homepage'));
        $menu->addChild('Портфолио', array('route' => 'portfolio'));
        $menu->addChild('Контакты', array('route' => 'contacts'));

        return $menu;
    }

    public function rightMenu(FactoryInterface $factory, array $options)
    {
        $em = $this->container->get('doctrine.orm.entity_manager');

        $menu = $factory->createItem('root');
        $menu->addChild('Главная', array('route' => 'homepage'));
        $menu->addChild('Портфолио', array('route' => 'portfolio'));
        $menu->addChild('Контакты', array('route' => 'contacts'));

        return $menu;
    }
}